package com.whately.core.base.fileupload.constant;

import lombok.Getter;

/**
 * 七牛云类型
 */
public enum FileModeEnum {
    img_opened("01"),
    img_private("21"),
    ;

    @Getter
    String mode;

    private FileModeEnum(String mode) {
        this.mode = mode;
    }


    public static FileModeEnum getByValue(String val){
        if(val==null){
            return null;
        }
        for(FileModeEnum typeEnum: FileModeEnum.values()){
            if(typeEnum.mode.equals(val)){
                return typeEnum;
            }
        }
        return null;
    }
}
